E.D.I. Import Layout

This appendix contains the following topics:

Introduction to E.D.I Import Layout

E.D.I Fields

 

Introduction to E.D.I Import Layout

Electronic Data Interchange (E.D.I.) is the electronic exchange of business documents using computers. Data is exchanged between trading partners. Using E.D.I. reduces resources required to manually process orders, invoices, etc. by enabling an import feature into the accounting application.

There is more information on the purpose of E.D.I. and the Order Entry E.D.I. interface in the E.D.I. Overview section of the Orders chapter.

The following section contains a list of the fields available for the E.D.I. import layout.

Some fields are described as This field is not imported or calculated during the import process. These fields are generated when importing therefore values should not be included in the import file. To account for the length of those fields, blank or zeros should be inserted.

There can be several record types in an E.D.I. import file: Header, Notes, Line and a Comment record. Each type is documented separately below. Here are some line and record import requirements:

The PBS system defaults to DIORDIMP.TXT for the import file name, but you can name the file anything we want as long as it is no more than 8 characters for the file name plus 3 for the extension.
All lines in the import file should be padded with spaces or zeroes as appropriate to the end of the line. Each line should be terminated with a CR/LF character set.
For one order the sequence of lines in the import file should be Header record, Line record(s), Comment record, and finally Note Record(s). Comments and Notes are optional. Repeat as necessary for additional orders. There can be multiple orders in one import file.
There can be one Header record and one Comment record to multiple Note and Line records.
An order should consist of at least one Header and one Line.
Comment and Note records are optional.

E.D.I Fields

Many of the fields have specific import formatting requirements and here are some of them:

Numeric format with assumed decimal places. The V character assumes the decimal place. The LIN-QTY-ORD field is designated as 13 bytes with sign trailing separate. The format of the field is 8 integers, 4 decimal, and the sign, for a total of 13 bytes. This is denoted as 99999999V9999+. in the file. The imported field should not contain the V character and will look like the following; 999999999999+.
Date format, CCYYMMDD, where CC = Century, YY = Year, MM = Month, and DD = Day of the month. 20100901 = January 09, 2010.
Time format, HHMMSSTT, where H = Hour, M = Minute, S = Second, and T = Hundredths of a second.
Alpha fields that are not imported should be padded with spaces. Numeric fields that are not imported should be padded with zeroes and a +/- sign if the number is signed.

Header Record

There must be one and only one header record per order. The following table lists the E.D.I. header import fields:

Field name

Description

Length

Type

Layout

Notes

 

Header Record

 

 

 

 

HDR-REC-TYP

Record Type

1

Alpha

 

Required. The value H denotes Header record

HDR-ORD-NO 

Order number, this is assigned during import process

6

Numeric

999999

This is the order number and is required only if deleting an existing order

HDR-EDI-DOC-NO

E.D.I. document number

12

Alpha

 

Required. This is the EDI document number

HDR-ORD-TYP

Order type

1

Alpha

 

This field must contain either a space or "D". If this has a value of "D" it will delete a previously imported order as long as it has not been processed and it has a matching HDR-ORD-NO (order number)

HDR-ORD-DAT       

Order date

8

Numeric

99999999 (CCYYMMDD)

Required

HDR-SLS-MAN-NO

Sales rep code for the order

3

Alpha

 

Required. It must match a sales rep that is on file in PBS

HDR-PO-NO

Customer's purchase order number for this order

15

Alpha

 

 

HDR-SHIP-DAT

Order ship date

8

Numeric

99999999 (CCYYMMDD)

This date cannot be earlier than the order date

HDR-CANCEL-DAT

This field is not imported

8

Numeric

99999999 (CCYYMMDD)

 

HDR-SHIP-VIA-COD

Ship via code

3

Alpha

 

Required

HDR-SHIP-VIA

Ship via description

15

Alpha

 

Required. It must match the description of the Ship Via Code description in PBS

HDR-SHIP-ZONE-COD

This field is not imported

3

Alpha

 

 

HDR-SHIP-ZONE-DESC

This field is not imported

25

Alpha

 

 

HDR-TERMS-COD

Customer's order terms code

3

Alpha

 

Required

HDR-TAX-COD

Customer's order tax code

3

Alpha

 

Required. It must match a tax code in PBS

HDR-LOC

Warehouse code for the order

2

Alpha

 

This field is required if multi-warehouses are used in Inventory Control. Otherwise it can be blank. See the I/C Control information doc

HDR-PFT-CTR

This field is not imported

8

Numeric

99999999

This is defaulted from O/E Control information

HDR-APPL-TO-NO

This is the apply to invoice number if the order is a credit memo

6

Numeric

999999

This field is required if the order is a credit memo. It must match an invoice in invoice history

HDR-COMMIS-PCT

This field is not imported

7

Numeric

999V999+

This field is populated based on the commission percent on the salesman or customer record

HDR-FREIGHT-AMT    

This field is not imported

11

Numeric

99999999V99+

 

HDR-MISC-AMT 

Imported

11

Numeric

99999999V99+

 

HDR-DISC-PCT       

Discount percent

6

Numeric

99V999+

 

HDR-DISC-AMT       

This field is not imported

11

Numeric

99999999V99+

 

HDR-TAX-AMT        

This field is not imported

11

Numeric

99999999V99+

This field is calculated based on the tax code in PBS

HDR-TOT-QTY-BO

This field is not imported

13

Numeric

99999999V9999+

 

HDR-NO-SHIP-LBLS

Number of shipping labels for order

2

Numeric

99

 

HDR-NO-COD-LBLS

Number of Cash on Delivery labels for order

2

Numeric

99

 

HDR-TOT-WEIGHT

This field is not imported

12

Numeric

99999999V999+

This field is calculated based on each item's weight

 

The next seven fields contain the customer info and address

 

 

 

 

HDR-CUST-NO        

Customer number

12

Alpha

 

Required. if the number is numeric it must have leading zeros

HDR-CUST-NAM       

Customer name

25

Alpha

 

Required

HDR-CUST-ADRS-1    

Billing address line one

25

Alpha

 

Required

HDR-CUST-ADRS-2    

Billing address line two

30

Alpha

 

Required

HDR-CUST-CITY

Billing city

15

Alpha

 

Required

HDR-CUST-STATE

Billing state

2

Alpha

 

Required

HDR-CUST-ZIP-COD

Billing zip code

10

Alpha

 

Required

 

This section starts the Ship-to information

 

 

 

 

HDR-SHIP-TO-NO

Ship to number set up in PBS

5

Numeric

99999

If the ship to number is not known for the customer it is set to zeros

HDR-SHIP-TO-NAM    

Ship to Name

25

Alpha

 

Required

HDR-SHIP-TO-ADRS-1 

Ship to Address 1

25

Alpha

 

Required

HDR-SHIP-TO-ADRS-2 

Ship to Address 2

31

Alpha

 

Required

HDR-SHIP-TO-ADRS-3

Ship to address 3

31

Alpha

 

Required

HDR-USER-DEF-1

This field is not imported

25

Alpha

 

 

HDR-USER-DEF-2

This field is not imported

25

Alpha

 

 

HDR-USER-DEF-3

This field is not imported

25

Alpha

 

 

HDR-USER-DEF-4

This field is not imported

25

Alpha

 

 

HDR-USER-DEF-5

This field is not imported

25

Alpha

 

 

HDR-RESERVED-INFO

This field is not imported

128

Alpha

 

 

HDR-INVC-INFO

 

 

 

 

 

HDR-INVC-METH

This field is not imported

1

Alpha

 

 

HDR-INVC-NO

This field is not imported

6

Numeric

999999

 

HDR-INVC-DAT

This field is not imported

8

Numeric

99999999 (CCYYMMDD)

 

HDR-SLS-AMT

This field is not imported

12

Numeric

999999999V99+

This field is not imported because the order total is calculated during the import process

HDR-PMT-RECD

This field is not imported

12

Numeric

999999999V99+

 

HDR-AMT-DUE

This field is not imported

12

Numeric

999999999V99+

 

HDR-TOT-NO-LINS

This field is not imported

6

Numeric

999999

This field is calculated during the import process

HDR-TOT-QTY

This field is not imported

14

Numeric

99999999V99999+

This field is calculated during the import process

HDR-TIME-STAMP-DAT

This field is not imported

8

Numeric

99999999 (CCYYMMDD)

 

HDR-TIME-STAMP-TIM

This field is not imported

8

Numeric

99999999

 

Notes Record

There may be multiple notes records per order. Here are the fields:

Field name

Description

Length

Type

Layout

Notes

NOTES-REC-TYP

Note record type

1

Alpha

 

Required. The value N denotes a Comment/Note record

NOTES-ORD-NO

Order number

6

Numeric

999999

The numberis assigned during the import process. Do not import this field

NOTES-EDI-DOC-NO

EDI document number

12

Alpha

 

Required. This is the EDI Document Order number. It must match the HDR-EDI-DOC-NO field in the header record

NOTES-NOTES-ID

Comment ID

20

Alpha

 

This field is not used

NOTES-NOTES-LIN

Comment text

78

Alpha

 

Required

NOTES-TIME-STAMP-DAT

This field is not imported

8

Numeric 99999999 (CCYYMMDD)

 

NOTES-TIME-STAMP-TIM

This field is not imported

8

Numeric 99999999  

Line Record

There may be multiple line records per order. Here are the fields:

Field name

Description

Length

Type

Layout

Notes

LIN-REC-TYP

Line Item indicator; see notes

1

Alpha

 

Required. The value L denotes a Line record

LIN-ORD-NO

Order Number

6

Numeric

999999

This is assigned during the import process. Do not import this field

LIN-EDI-DOC-NO

EDI Document number

12

Alpha

 

Required. This is the EDI Document Order number, It should match HDR-EDI-DOC-NO

LIN-LIN-NO

Line number

5

Numeric

99999

This field is not imported. The order line numbers are calculated during the import process

LIN-ITEM-NO

Item number

15

Alpha

 

Required. If numeric you must have leading zeros

LIN-UPC-CODE

Item UPC code

20

Alpha

 

If this field is blank it will be skipped, if this field has a non-space value it will be verified against the I/C Item keyword file

LIN-DESC-1

Line item description 1

25

Alpha

 

If this field is blank it will be defaulted from the item file record

LIN-DESC-2

Line Item description 2

25

Alpha

 

If this field is blank it will be defaulted from the item file record

LIN-LOC

Warehouse code for the line item

2

Alpha

 

This field is required if multiple warehouses are being used in I/C, otherwise leave it blank

LIN-DROP-SHIP-FLG

Drop ship flag

1

Alpha

 

If the item is to be drop shipped to the customer this field should be set to Y

LIN-SPEC-ORD-FLG

This field is not imported

1

Alpha

 

 

LIN-DISC-PCT

Order line discount percent

6

Numeric

99V9999

 

LIN-SHIP-DAT

Order line ship date

8

Numeric

99999999

(CCYYMMDD)

 

LIN-SLS-MAN-NO

This field is not imported

3

Alpha

 

 

LIN-PFT-CTR

This field is not imported

8

Numeric

99999999

 

LIN-REF

Line reference

15

Alpha

 

 

LIN-ORD-UNIT

Stocking unit of measure

4

Alpha

 

This must match the item's stocking unit of measure or one of the alternate units of measure

LIN-QTY-ORD

Quantity ordered

13

Numeric

99999999V9999+

 

LIN-QTY-SHIP

This field is not imported

13

Numeric

99999999V9999+

 

LIN-QTY-BO

This field is not imported

13

Numeric

99999999V9999+

 

LIN-QTY-RTN

This field is not imported

13

Numeric

99999999V9999+

 

LIN-PRC

Line extended amount. This field is not imported

13

Numeric

99999999V9999+

This is calculated during import. This is price times quantity

LIN-PRC-1

Line item unit price

13

Numeric

99999999V9999+

Required.

LIN-UNIT-COST

This field is not imported

12

Numeric

9999999V99999

 

LIN-TIME-STAMP-DAT

This field is not imported

8

Numeric

99999999

 

LIN-TIME-STAMP-TIM

This field is not imported

8

Numeric

99999999

 

 

Comment Record

There can be one comment per order. Here are the fields:

Field name

Description

Length

Type

Layout

Notes

LIN-REC-TYP

Comment indicator, see notes

1

Alpha

 

Required. The value C denotes a Comment record

LIN-ORD-NO

Order number, this is assigned during import process

6

Numeric

999999

Zero fill

LIN-EDI-DOC-NO

EDI document number should match HDR-EDI-DOC-NO

12

Alpha

 

Required. This is the EDI Document Order number

LIN-LIN-NO

This field is not imported

5

Numeric

9999

The order comment line number is defaulted to 9999 with zero fill

LIN-DATA

Comment data

150

Alpha